package com.ss.user.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ss.user.dao.impl.AuthorityDaoImpl;
import com.ss.user.pojo.Authority;
import com.ss.user.service.AuthorityService;

/**
 * 功能service
 *
 */
@Service("authorityService")
public class AuthorityServiceImpl implements AuthorityService{

	@Autowired
	public AuthorityDaoImpl authorityDao;

	/**
	 * 新增功能
	 * @param authority
	 * @author 008042
	 */
	@Override
	public void addAuthority(Authority authority) {
		authorityDao.addAuthority(authority);
	}
	/**
	 * 更新功能
	 * @param authority
	 * @author 008042
	 */
	@Override
	public void updateAuthority(Authority authority) {
		authorityDao.updateAuthority(authority);
	}
	/**
	 * 查询功能
	 * @param authority
	 * @return
	 * @author 008042
	 */
	@Override
	public Authority queryAuthority(Authority authority) {
		return authorityDao.queryAuthority(authority);
	}
	/**
	 * 根绝ID查询功能
	 * @param id
	 * @return
	 * @author 008042
	 */
	@Override
	public Authority queryAuthorityById(String id) {
		return authorityDao.queryAuthorityByID(id);
	}
	/**
	 * 查询角色已有功能
	 * @param id
	 * @return
	 * @author 008042
	 */
	@Override
	public List<Authority> queryAuthorityYes(String id) {
		return authorityDao.queryAuthorityYes(id);
	}
	/**
	 * 查询角色没有的功能
	 * @param id
	 * @return
	 * @author 008042
	 */
	@Override
	public List<Authority> queryAuthorityNo(String id) {
		return authorityDao.queryAuthorityNo(id);
	}

}
